Skip to content

[PWGLF] Add a workflow for (anti)triton analysis#17151

Open
AnalitikGnid wants to merge 5 commits into
AliceO2Group:masterfrom
AnalitikGnid:pwglf-antitriton
Open

[PWGLF] Add a workflow for (anti)triton analysis#17151
AnalitikGnid wants to merge 5 commits into
AliceO2Group:masterfrom
AnalitikGnid:pwglf-antitriton

Conversation

@AnalitikGnid

Copy link
Copy Markdown
Contributor

Summary

Adds a new workflow for measuring (anti)triton production in Run 3 data

Dependencies

Uses output of the o2-analysis-cf-single-track-selector (https://aliceo2group.github.io/analysis-framework/docs/datamodel/pwgTables.html)

Links

Presented at the Nuclei and Exotica PAG meeting on Thursday, 16th July, 2026 (https://indico.cern.ch/event/1688019/)

@github-actions github-actions Bot added the pwglf label Jul 21, 2026
@github-actions github-actions Bot changed the title Add a workflow for (anti)triton analysis [PWGLF] Add a workflow for (anti)triton analysis Jul 21, 2026
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

O2 linter results: ❌ 2 errors, ⚠️ 23 warnings, 🔕 0 disabled

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 3da74bd at 2026-07-21 14:55:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:347:9: error: unused variable 'cnt' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:347:9: error: unused variable 'cnt' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:347:9: error: unused variable 'cnt' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:245:65: error: unused parameter 'pdg' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:245:65: error: unused parameter 'pdg' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:245:65: error: unused parameter 'pdg' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for bc69f0c at 2026-07-21 16:49:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 29 errors and 28 warnings.'
Found 29 errors and 28 warnings.
++ [[ 29 -gt 0 ]]
++ cat /sw/BUILD/41268eafeda58e4074914082e92524b220edd01b/O2Physics-code-check/errors.txt
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:20:1: error: included header Multiplicity.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:25:1: error: included header DataTypes.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:28:1: error: included header StaticFor.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:30:1: error: included header Utils.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:32:1: error: included header TH1F.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:33:1: error: included header TParameter.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:48:46: error: no header providing "o2::framework::OutputObjHandlingPolicy" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:51:3: error: no header providing "o2::framework::Configurable" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:68:16: error: no header providing "int16_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:106:21: error: no header providing "TH1" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:107:21: error: no header providing "TH2" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:127:21: error: no header providing "TH3" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:132:34: error: member 'stageDirs' of type 'const std::vector<std::string>' (aka 'const vector<basic_string<char>>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:146:36: error: member 'signDirs' of type 'const std::array<std::string, 2>' (aka 'const array<basic_string<char>, 2>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:155:71: error: no header providing "o2::framework::kTH1F" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:157:78: error: no header providing "o2::framework::kTH2F" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:158:94: error: no header providing "M_PI" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:175:7: error: no header providing "o2::framework::kTH3F" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:192:42: error: no header providing "Form" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:208:29: error: no header providing "std::sqrt" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:217:24: error: no header providing "std::log" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:274:28: error: no header providing "o2::framework::InitContext" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:278:16: error: no header providing "o2::aod::ITSResponse" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:284:13: error: narrowing conversion from 'value_type' (aka 'float') to 'int' [bugprone-narrowing-conversions,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:289:21: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:299:10: error: no header providing "size_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:307:11: error: no header providing "o2::framework::AxisSpec" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:312:52: error: no header providing "o2::framework::kTH2I" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:433:3: error: no header providing "PROCESS_SWITCH" is directly included [misc-include-cleaner,-warnings-as-errors]
++ [[ 28 -gt 0 ]]
++ cat /sw/BUILD/41268eafeda58e4074914082e92524b220edd01b/O2Physics-code-check/warnings.txt
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:251:25: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:277:20: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:323:69: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:325:68: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:327:62: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:329:73: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:331:86: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:333:72: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:335:102: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:337:106: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:339:114: warning: statement should be inside braces [readability-braces-around-statements]
[0 more errors; see full log]

Full log here.

@vkucera vkucera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are adding a new file, make sure it's clean from errors and warnings.

Comment thread PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx Outdated
Comment thread PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx Outdated
Comment thread PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx Outdated
Comment thread PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx Outdated
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for bc69f0c at 2026-07-22 08:39:

## sw/BUILD/O2Physics-latest/log
c++: fatal error: Killed signal terminated program cc1plus
ninja: build stopped: subcommand failed.

Full log here.

@AnalitikGnid
AnalitikGnid requested a review from vkucera July 23, 2026 20:52
std::pair<int, std::vector<float>> TPCcuts;
std::pair<int, std::vector<float>> TOFcuts;

static constexpr float kMassTriton = o2::constants::physics::MassTriton; // GeV/c^2

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Follow the O2 naming conventions. This is not ROOT. Don't use the k prefix.
  • You just created an unnecessary alias for an existing constant. Use the constant directly.

Comment on lines +102 to +104
std::pair<int, std::vector<float>> ITScuts;
std::pair<int, std::vector<float>> TPCcuts;
std::pair<int, std::vector<float>> TOFcuts;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow naming conventions.

Comment on lines +115 to +123
std::shared_ptr<TH1> eta;
std::shared_ptr<TH2> eta_to_y;
std::shared_ptr<TH1> y;
std::shared_ptr<TH1> phi;
std::shared_ptr<TH1> p;
std::shared_ptr<TH1> pt;
std::shared_ptr<TH2> dcaxy_to_p;
std::shared_ptr<TH2> dcaxy_to_pt;
std::shared_ptr<TH2> dcaz_to_p;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow naming conventions.

}

template <typename TrackType>
static float getMTOF(const TrackType& track)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow naming conventions.

void fillHistSet(HistSet& h, const TrackType& track, int pdg)
{
const float mass = kMassTriton;
const auto y = static_cast<float>(RecoDecay::y(std::array{track.px(), track.py(), track.pz()}, mass));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const auto y = static_cast<float>(RecoDecay::y(std::array{track.px(), track.py(), track.pz()}, mass));
const auto y = static_cast<float>(RecoDecay::y(track.pVector(), mass));

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 890b1bd at 2026-07-24 13:44:

## sw/BUILD/O2Physics-latest/log
c++: fatal error: Killed signal terminated program cc1plus
c++: fatal error: Killed signal terminated program cc1plus
ninja: build stopped: subcommand failed.

Full log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants